User State API
==============

Each utterance in a **Dialog state** is generated by some **User** either **Human** or **Bot**. 
The ``user.user_type`` field stores reference to source of the utterance:

     .. code:: javascript

        {"utterances": [{"user": {"user_type": "human"}}]}

A skill can update any fields in **User** (**Human** or **Bot**) objects. If a **Skill** updates a **Human**,
the **Human** fields will be changed in this utterance accordingly. If a **Skill** updates a **Bot**, the **Bot** fields will be
changed in the *next* (generated by the bot) utterance.

Each new dialog starts with a new **Bot** with all default fields. However, the **Human** object is updated permanently, and
when a **Human** starts a new dialog, the object is retrieved from a database with all updated fields.

The history of all changes made by skills to users can be looked up at the list of possible responses in the
``hypotheses`` field of a human utterance:

    .. code:: javascript

        {"utterances": [{"user": {"user_type": "human"}, "hypotheses": []}]}
